<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增会议')" />
	<th:block th:include="include :: datetimepicker-css" />
	<th:block th:include="include :: bootstrap-fileinput-css" />
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
	<script type="text/javascript" charset="utf-8" th:src="@{/ueditor/ueditor.config.js}"></script>
	<script type="text/javascript" charset="utf-8" th:src="@{/ueditor/ueditor.all.js}"> </script>
	<script type="text/javascript" charset="utf-8" th:src="@{/ueditor/lang/zh-cn/zh-cn.js}"></script>
	<link type="text/css" rel="stylesheet" th:href="@{/ueditor/third-party/video-js/video-js.css}"/>
	<script  type="text/javascript" th:src="@{/ueditor/third-party/video-js/video.js}"></script>+
</head>
<body class="white-bg">
<div class="center-flex">
	会员福利
</div>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-meeting-add" th:object="${member}">
		<input id="tag" type="hidden" th:value="${tag}" />
		<div class="row">
			<div class="col-sm-6">
				<div class="form-group">
					<div class="col-sm-10">
						<input id="param1" name="param1"  th:field="*{param1}" class="form-control" type="text" maxlength="11" readonly>
					</div>
				</div>
			</div>
			<div class="col-sm-6">
				<div class="form-group">
					<div class="col-sm-10">
						<input id="param2" name="param2" class="form-control" th:field="*{param2}" type="text" maxlength="20" readonly>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-6">
				<div class="form-group">
					<div class="col-sm-10">
						<input id="param3" name="param3"  th:field="*{param3}" class="form-control" type="text" maxlength="11" readonly>
					</div>
				</div>
			</div>
			<div class="col-sm-6">
				<div class="form-group">
					<div class="col-sm-10">
						<input id="param4" name="param4" class="form-control" th:field="*{param4}" type="text" maxlength="20" readonly>
					</div>
				</div>
			</div>
		</div>
	</form>
</div>
<div class="btn-group-sm" id="toolbar-join" role="group" style="text-align:center">
	<a class="btn btn-success" style="font-size:20px;width:200px;" onclick="saveMemberBecome()">
		加入我们
	</a>
</div>
<div class="btn-group-sm" id="toolbar-exit" role="group" style="text-align:center">
	<a class="btn btn-success" style="font-size:20px;width:200px;">
		已成为会员
	</a>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-fileinput-js" />
<style>
	.center-flex {
      display: flex;
      justify-content: center; /* 水平居中 */
      align-items: center; /* 垂直居中 */
      font-size: 20px;
    }
</style>
<script type="text/javascript">
	var prefix = ctx + "system/member";
	var pref = ctx + "system/cloumn";

	$("#isShuffling").on("change",function  () {
		var isShuffling = $("input[id='isShuffling']").is(':checked') == true ? 1 : 0;
		if (isShuffling == 0) {
			$("#div2").attr("style", "display:none;");
		} else {
			$("#div2").attr("style", "display:block;");
		}
	})
	$("#datetimepicker-demo-3").datetimepicker({
		format: "yyyy-mm-dd hh:ii:ss",
		autoclose: true,
		todayBtn :true
	});
	$("#imgfiles").fileinput({
		language: 'zh', //设置语言
		'showUpload': true,
		'previewFileType': 'image',
		'showPreview': true,
		'showClose': false,
		allowedFileExtensions: ["png","jpg","gif","bmp","jpeg"],//接收的文件后缀
		uploadAsync: true, //默认异步上传
		uploadUrl: ctx + "common/upload", //上传的地址
		dropZoneEnabled: false,//是否显示拖拽区域
		autoReplaceBoolean : false,//选择图片时不清空原图片
		maxFileCount: 9,
		deleteUrl: ""
	});
	var img_urls =  "";
	$('#imgfiles').on('fileuploaded', function(event, data, previewId, index) {
		if(typeof(data.response.url) != 'undefined'){
			img_urls = img_urls+data.response.url;
			$("#imageurl").val(img_urls);
		}
	});


	$("#form-notice-add").validate({
		focusCleanup: true
	});

	function saveMemberBecome(){
		$.operate.save(prefix + "/join");
	}

	/*用户管理-新增-选择部门树*/
	function selectDeptTree() {
		var url = pref + "/selectTree"+$("#treeId").val();
		var options = {
			title: '选择栏目',
			width: "380",
			url: pref + "/selectTree/" + $("#treeId").val(),
			callBack: doSubmit
		};
		$.modal.openOptions(options);
	}
	function doSubmit(index, layero){
		var body = layer.getChildFrame('body', index);
		$("#treeId").val(body.find('#treeId').val());
		$("#treeName").val(body.find('#treeName').val());
		layer.close(index);
	}





	var ue = UE.getEditor('editors',{
	});

	$(function(){
		var ue = UE.getEditor('editors')
		ue.addListener("ready", function () {
		});

		var tag = $("#tag").val();
		if(0 == tag){
			$("#toolbar-exit").hide()
			$("#toolbar-join").show()
		}else{
			$("#toolbar-join").hide()
			$("#toolbar-exit").show()
		}
	});
</script>
</body>
</html>
